<app-detail-header
  [title]="'GENERAL.INFO.OPERATION' | i18n"
  [ifEditable]="false"
></app-detail-header>

<div nz-row nzType="flex" nzJustify="center" nzAlign="middle" nzGutter="24">
  <form class="cil__base-block--form cil__charge-back--operate" nz-form>
    <div nz-row [nzGutter]="24">
      <div nz-col [nzSpan]="24">
        <nz-form-item>
          <nz-form-label>{{trans('VALIDATION.REQUIRED_SELECT', { name: trans('OPERATION.CHARGEBACK.HANDLEMETHOD')})}}</nz-form-label>
          <nz-form-control>
            <nz-radio-group [(ngModel)]="processType" name="operation">
              <label nz-radio [nzValue]="EChargeBackProcessType.Close">{{'OPERATION.CHARGEBACK.PROCESSTYPE.CLOSE' | i18n}}</label>
              <label nz-radio [nzValue]="EChargeBackProcessType.MerchantDebit">{{'OPERATION.CHARGEBACK.PROCESSTYPE.MERCHANTDEBIT' | i18n}}</label>
              <label nz-radio [nzValue]="EChargeBackProcessType.Arbitrate">{{'OPERATION.CHARGEBACK.PROCESSTYPE.ARBITRATE' | i18n}}</label>
            </nz-radio-group>
          </nz-form-control>
        </nz-form-item>

        <!-- 关闭案例 -->
        <ng-container *ngIf="processType === EChargeBackProcessType.Close">
          <app-charge-back-close-operate></app-charge-back-close-operate>
        </ng-container>

        <!-- 扣款 -->
        <ng-container *ngIf="processType === EChargeBackProcessType.MerchantDebit">
          <app-charge-back-debit-operate [currency]="chargeBackDetail.transCurr" [transAmt]="chargeBackDetail.transAmt"></app-charge-back-debit-operate>
        </ng-container>

        <!-- 仲裁 和 关闭相同 -->
        <ng-container *ngIf="processType === EChargeBackProcessType.Arbitrate">
          <app-charge-back-close-operate ></app-charge-back-close-operate>
        </ng-container>
      </div>

      <div nz-col [nzSpan]="24">
        <div nz-row nzType="flex" nzJustify="center" nzAlign="middle">
          <button nz-button (click)="cancel()">{{'BTN.CANCEL' | i18n}}</button>
          <button nz-button (click)="submit()">{{'BTN.SUBMIT' | i18n}}</button>
        </div>
      </div>
    </div>
  </form>
</div>